package org.yzh.web.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.yezhihao.protostar.annotation.Field;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.Map;

@Data
public class LocationVo {
    private Long id;
    @Field( desc = "设备ID")
    private String clientId;
    @Field( desc = "经度")
    private Double lng;
    @Field( desc = "纬度")
    private Double lat;

    private Date gmtCreate;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Field( desc = "开始时间")
    private Date gmtCreate1;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Field( desc = "结束时间")
    private Date gmtCreate2;
    private Map<Integer, Object> attributes;
    @Field( desc = "设备电量")
    private int electricity;
    @Field( desc = "1是告警0是不报警")
    private int warnBit;
    @Schema(description = "分页 默认1")
    private final Integer pageNum = 1;

    @Schema(description = "分页大小 默认10")
    private final Integer pageSize = 50;
}
